package com.pzl.service.impl;

import com.pzl.mapper.RoleMapper;
import com.pzl.entity.Role;
import com.pzl.service.RoleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * RoleServiceImpl class
 *
 * @Author panzhenglei
 * @Date 2019/6/8 11:43 AM
 */


@Service
public class RoleServiceImpl implements RoleService {

    @Autowired
    private RoleMapper roleMapper;

    @Override
    public List<Role> findAll() {
        List<Role> roles = roleMapper.findAll();
        return roles;
    }

   /* @Override
    public Long save(String roleName,String roleDesc) throws Exception {


        Long save = roleMapper.save(roleName, roleDesc);

        return save;

    }*/

    @Override
    public Long save(Role role) throws Exception {


        Long save = roleMapper.save(role);

        return save;

    }


}
